﻿using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using SlaughterItem.API.Application.Commands.Week02.Check_In;
using SlaughterItem.Common.Dtos;

namespace SlaughterItem.API.Controllers.WangHaoQi
{
    /// <summary>
    /// 进场登记控制器 写入
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class CheckInController : ControllerBase
    {
        private readonly IMediator mediatora;

        public CheckInController(IMediator mediatora)
        {
            this.mediatora = mediatora;
        }
        /// <summary>
        /// 进场登记添加
        /// </summary>
        /// <param name="cmd"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<Result> CheckInAdd(CheckInAddCommand cmd)
        {
            return await mediatora.Send(cmd);
        }
    }
}
